<div class="main-content">
        <!-- Content Header (Page header) -->
        <div class="breadcrumbs" id="breadcrumbs">
        	<script type="text/javascript">
				try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
			</script>
			<!-- .breadcrumb -->
        </div>
        
        <div class="page-content">
            <div class="row">
            <div class="page-header">
				<h1>版本编辑</h1>
			</div>
			<div class="col-xs-12">
			<?php if (validation_errors()!=''){?>
	           <div id="info_msg" class="alert alert-danger"><?php echo validation_errors();?></div>
	        <?php }?>
	            <!-- general form elements disabled -->
	            <form id="usrform" role="form" action="<?php echo base_url().'admin/systems/edit_app/'.$app_info->id;?>" method="post">
	                   <input type="hidden" name="app_id" value="<?php if (isset($app_info->id))echo $app_info->id;?>">
	                	<div class="box-body" style="display: inline-block;width: 100%">
	                        <div class="form-group col-xs-6">
	                            <label>终端</label>
	                            <select name="client_type" class="form-control" check-type="required">
	                            	<option value="">请选择终端类型</option>
	                            	<option value="平板" <?php if(isset($app_info->client_type)&&$app_info->client_type == "平板") echo "selected"?>>平板</option>
		                            <option value="Android" <?php if(isset($app_info->client_type)&&$app_info->client_type == "Android") echo "selected"?>>Android</option>
		                            <option value="IOS" <?php if(isset($app_info->client_type)&&$app_info->client_type == "IOS") echo "selected"?>>IOS</option>
	                            </select>
	                        </div>
	                        <div class="form-group col-xs-6">
	                            <label>应用版本号</label>
	                            <input name="version" type="text" class="form-control" placeholder="输入 ..." value="<?php if (validation_errors()!='') echo set_value('version');elseif (isset($app_info->version))echo $app_info->version;?>" check-type="required">
	                        </div>
	                        <div class="form-group col-xs-6">
	                            <label>版本名称</label>
	                            <input name="version_name" type="text" class="form-control" placeholder="输入 ..." value="<?php if (validation_errors()!='') echo set_value('version_name');elseif (isset($app_info->version_name))echo $app_info->version_name;?>" check-type="required">
	                        </div>
	                        <div class="form-group col-xs-6">
	                            <label>安装文件</label>
	                            <input id="apk_file" name="download_url" type="text" class="form-control" placeholder="选择上传..." value="<?php if (validation_errors()!='') echo set_value('download_url');elseif (isset($app_info->download_url))echo $app_info->download_url;?>" check-type="required" readonly="true">
								<a style="margin-top: -28px;float: right;height: 28px;border-radius:0px; " href="<?php echo site_url("admin/upyun/upload_modal/apk_file")?>" data-target="#uploadModal" data-toggle="modal" class="btn btn-info">上传APK</a>
	                        </div>
	                        <div class="form-group col-xs-6">
	                            <label>升级说明</label>
	                            <textarea name="note" rows="5" cols="" class="form-control" placeholder="输入 ..."><?php if (validation_errors()!='') echo set_value('note');elseif (isset($app_info->note))echo $app_info->note;?></textarea>
	                        </div>
	                	</div><!-- /.box-body -->
	                	<div class="clearfix form-actions">
						<div class="col-md-offset-3 col-md-9">
							<button id="btnSubmit" class="btn btn-info" type="submit">
								<i class="icon-ok bigger-110"></i>
								保存
							</button>

							&nbsp; &nbsp; &nbsp;
							<a class="btn" href="<?php echo base_url()."admin/systems/app"?>">
								<i class="icon-undo bigger-110"></i>
								返回
							</a>
						</div>
					</div>
	                </form>
	            </div><!-- /.box -->
	        </div>
		</div>
        </div>
        
	<script type="text/javascript">
	$("#usrform").validation();
	//保存
	$("#btnSubmit").on('click',function(event){
	  // 2.最后要调用 valid()方法。
	  if ($("#usrform").valid()==false){
	    return false;
	  }
	});
	</script>
